<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=do, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 500px;
            height: 600px;
            border:1px solid #ccc;
            background-image: url(./images/sb.png);
            background-repeat: no-repeat;
            /* 希望背景图片占满，那就要设置background-size */
            /* contain 等比例缩放图片，有一边到盒子的边界就停止缩放 */
            /* cove 等比例缩放图片，必须图片占满整个就停止缩放 */
            background-size: cover;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>